class localstorage {
  public set(key: string, value: any) {
    localStorage.setItem(key, JSON.stringify(value));
  }
  public get(key: string) {
    let svalue: string = localStorage.getItem(key);
    try {
      return JSON.parse(svalue);
    } catch (e) {}
    return svalue;
  }
}

export default new localstorage();
